home *** CD-ROM | disk | FTP | other *** search
/ Dr. Windows 3 / dr win3.zip / dr win3 / DEMONSTR / STDM13.ZIP / SCRIPT.TXT < prev    next >
Text File  |  1993-06-23  |  9KB  |  416 lines

  1. //
  2. // Launch paintbrush.exe
  3. //
  4. :(pbrush.exe
  5. @Vv
  6. //
  7. //        SHOW SEVERAL INTRODUCTORY TEXT BOXES
  8. //
  9. :#L
  10. This small script will highlight several points of interest for you, as a demo
  11. script designer.
  12. I hope, you have already read README.TXT file, and you are familiar with the
  13. basic concepts of Stdemo Player. If not, you'll have a chance to do this later.
  14. .N
  15. As you can see, this box has two buttons. If you would like to stop this demo -
  16. select "Stop" button at any time, otherwise select "Continue". The same is correct
  17. for all dialog boxes to come.
  18. .N
  19. Try to move this dialog box, as you move any window. Note, however, that you can
  20. "drag" this box by selecting any point inside it, except buttons. It makes the whole
  21. business of moving a lot easier.
  22. #
  23. :#MU
  24. Even if you manage to move it outside the screen, so that it becomes impossible to
  25. move it back - you still are able to continue execution, by pressing C key, or to
  26. stop it by pressing S key.
  27. .S
  28. Note also how politely cursor points to the "Continue" button, so that the only
  29. things you have to do are: read and click.
  30. #
  31. :#M
  32. You may ask, how I created this solid background? Rather simple.
  33. I started the Paintbrush, and selected View Picture from it's menu.
  34. These are the commands, which have done this:
  35. .S
  36. :(pbrush.exe
  37. .N
  38. @Vv
  39. #
  40. //
  41. //        SHOW THE MAIN MENU
  42. //
  43. :LmainMenu
  44. :*L
  45. Now you may choose one of the topics and continue...
  46. 1startreadMe|Show the readme.txt.
  47. 2startScriptTxt|Show the script.txt ( currently running script).
  48. 4textBox|Demonstrate various TEXT  boxes.
  49. 5menuBox|Demonstrate various MENU  boxes.
  50. 6inputBox|Demonstrate various INPUT boxes.
  51. 7calcDemo|Demonstrate mouse actions.
  52. 8pbrushDemo|Extensive keyboard/mouse action script.
  53. 9finishDemo|Finish this demo.
  54. *
  55. //
  56. //            SHOW README.TXT
  57. //
  58. :LstartreadMe
  59. :(notepad.exe readme.txt|1
  60. :LcontrolNotepad
  61. :*MDR
  62. 1pageDown|Scroll one page down
  63. 2pageUp|Scroll one page up
  64. 3goBottom|Show the last page
  65. 4goTop|Show the first page
  66. 5closeReadme|Return to the main menu
  67. *
  68. :LpageDown
  69. ]+
  70. :GcontrolNotepad
  71. :LpageUp
  72. ]-
  73. :GcontrolNotepad
  74. :LgoBottom
  75. %]E
  76. :GcontrolNotepad
  77. :LgoTop
  78. %]H
  79. :GcontrolNotepad
  80. :LcloseReadme
  81. @FX
  82. :)
  83. :GmainMenu
  84. //
  85. //
  86. //             DEMONSTRATE VARIOUS TEXT BOXES
  87. //
  88. //
  89. :LtextBox
  90. :#W
  91. There are 5 text boxes available at the present time. They vary by their size
  92. only. Any can be placed at one of the 9 pre-defined screen locations.
  93. I'll show all of them one by one.
  94. .S
  95. This one - is the WIDE box.
  96. #
  97. :#NUL
  98. And this is the NARROW box. I programmed it to appear in the upper left corner
  99. of the screen.
  100. #
  101. :#SCD
  102. This one is SMALL. It is centered at the bottom of screen.
  103. #
  104. :#MRD
  105. This is the MEDIUM one.
  106. .S
  107. .S
  108. .S
  109. It is located in the bottom right corner.
  110. #
  111. :#L
  112. And finally the LARGE one.
  113. .N
  114. In the center.
  115. #
  116. :GmainMenu
  117. //
  118. //            SHOW README.TXT
  119. //
  120. :LstartScriptTxt
  121. :(notepad.exe script.txt|1
  122. :LcontrolScriptTxt
  123. :*MDR
  124. 1pageScriptDown|Scroll one page down
  125. 2pageScriptUp|Scroll one page up
  126. 3goScriptBottom|Show the last page
  127. 4goScriptTop|Show the first page
  128. 5closeScriptTxt|Return to the main menu
  129. *
  130. :LpageScriptDown
  131. ]+
  132. :GcontrolScriptTxt
  133. :LpageScriptUp
  134. ]-
  135. :GcontrolScriptTxt
  136. :LgoScriptBottom
  137. %]E
  138. :GcontrolScriptTxt
  139. :LgoScriptTop
  140. %]H
  141. :GcontrolScriptTxt
  142. :LcloseScriptTxt
  143. @FX
  144. :)
  145. :GmainMenu
  146. //
  147. //
  148. //             DEMONSTRATE VARIOUS MENU BOXES
  149. //
  150. //
  151. :LmenuBox
  152. :#M
  153. You actually just saw the MENU box - you've chosen this topic from it.
  154. .S
  155. Now, I'll show several more menu boxes to demonstrate how you can customize
  156. them.
  157. #
  158. :*S
  159. Small box has only two items.
  160. 1cmenu|Whatever you chose -
  161. 2cmenu|I go ahead...
  162. *
  163. :Lcmenu
  164. :#S
  165. Then I'll show the same box, but without the header text.
  166. .S
  167. Note that the header field is hidden.
  168. #
  169. :*S
  170. 1cmenu1|The same box, but...
  171. 2cmenu1|without the header field.
  172. *
  173. :Lcmenu1
  174. :*M
  175. This is the MEDIUM menu box. All 5 fields are present, as you see.
  176. 1cmenu2|First menu item...
  177. 2cmenu2|Second menu item...
  178. 3cmenu2|Third menu item...
  179. 4cmenu2|Fourth menu item...
  180. 5cmenu2|Fifth menu item...
  181. *
  182. :Lcmenu2
  183. :*M
  184. Now look, this is the same box - but I skipped 1-st, 3-rd and 5-th items.
  185. 2cmenu3|Second menu item...
  186. 4cmenu3|Fourth menu item...
  187. *
  188. :Lcmenu3
  189. :*L
  190. And here the full-blown LARGE menu box goes... Of course, when you code it,
  191. you may skip the header and/or any of the items. Isn't it nice to have so many choices?
  192. 1cmenu4|This is the first item of the large menu box.
  193. 2cmenu4|This is the second item of the large menu box.
  194. 3cmenu4|This is the third item of the large menu box.
  195. 4cmenu4|This is the fourth item of the large menu box.
  196. 5cmenu4|This is the fifth item of the large menu box.
  197. 6cmenu4|This is the sixth item of the large menu box.
  198. 7cmenu4|This is the seventh item of the large menu box.
  199. 8cmenu4|This is the eighth item of the large menu box.
  200. 9cmenu4|This is the ninth item of the large menu box.
  201. *
  202. :Lcmenu4
  203. :GmainMenu
  204. :LinputBox
  205. //
  206. //
  207. //             DEMONSTRATE VARIOUS INPUT BOXES
  208. //
  209. //
  210. :#M
  211. There are 3 available sizes for the INPUT boxes: small, medium and large.
  212. Every box has a header text field and from 1 to 9 edit fields. For the medium and
  213. large boxes every edit field paired with the description field.
  214. .S
  215. You'd better look than read...
  216. #
  217. // Clear all variables.
  218. :$1
  219. :$2
  220. :$3
  221. :$4
  222. :$5
  223. :$6
  224. :$7
  225. :$8
  226. :$9
  227. :%S
  228. This is the small input box.
  229. Note, it has only one editable field.
  230. 1
  231. %
  232. :$1This is the text, assigned to $1
  233. :%S
  234. This is the same box, but it's edit field
  235. is not empty.
  236. 1
  237. %
  238. :$1
  239. :%M
  240. This is the MEDIUM input box. As you see it has 5 edit fields.
  241. Enter something...
  242. 1Description 1
  243. 2Description 2
  244. 3Description 3
  245. 4Description 4
  246. 5Description 5
  247. %
  248. :%M
  249. This is the same MEDIUM input box, but I skipped the 1-st and the 5-th fields.
  250. 2Description 2
  251. 3Description 3
  252. 4Description 4
  253. %
  254. :%L
  255. This is the full LARGE input box. Note that
  256. some fields are without description.
  257. 1Description for the field 1
  258. 2Description for the field 2
  259. 3Description for the field 3
  260. 4Description for the field 4
  261. 5
  262. 6Description for the field 6
  263. 7Description for the field 7
  264. 8
  265. 9Description for the field 9
  266. %
  267. :%L
  268. And this is the same LARGE input box. You may skip some fields in it. Note that
  269. some fields are missing.
  270. 1Description for the field 1
  271. 3Description for the field 3
  272. 5Description for the field 5
  273. 7Description for the field 7
  274. 9Description for the field 9
  275. %
  276. :#S
  277. And now I'll show how you can use what is entered into the edit
  278. fields of the INPUT box. I hope, you have typed something.
  279. #
  280. :(notepad.exe|1
  281. If you have entered some text into the edit fields,]!
  282. I'll type it here (values are enclosed in the angle brackets)]:]!
  283. The first field has the value]:        <$1>]!
  284. The second field has the value]:        <$2>]!
  285. The third field has the value]:        <$3>]!
  286. The fourth field has the value]:        <$4>]!
  287. The fifth field has the value]:        <$5>]!
  288. The sixth field has the value]:        <$6>]!
  289. The seventh field has the value]:    <$7>]!
  290. The eighth field has the value]:        <$8>]!
  291. The ninth field has the value]:        <$9>]!
  292. :#SDR
  293. Simply click continue...
  294. #
  295. @FX
  296. :)
  297. // clear all variables
  298. :$1
  299. :$2
  300. :$3
  301. :$4
  302. :$5
  303. :$6
  304. :$7
  305. :$8
  306. :$9
  307. :GmainMenu
  308. //
  309. //            DEMONSTRATE MOUSE ACTIONS
  310. //
  311. :LcalcDemo
  312. :(calc.exe
  313. :C11
  314. :S324|283
  315. :OFC
  316. @VT
  317. // Clear
  318. :#SUL
  319. I'm going to move the cursor to the 'CLEAR' button - and click.
  320. #
  321. :M0|0
  322. :M38|66|100
  323. :BL1:BL0
  324. // click 2
  325. :#SUL
  326. Now I'm going to move the cursor to the '2' button - and click.
  327. #
  328. :M135|196|100
  329. :BL1:BL0
  330. // click *
  331. :#SUL
  332. Now I'll move to the '*' button - and click.
  333. #
  334. :M242|152|100
  335. :BL1:BL0
  336. // click 3
  337. :#SUL
  338. And here we go to the '3' button - and click.
  339. #
  340. :M189|196|100
  341. :BL1:BL0
  342. // click =
  343. :#SUL
  344. Now I'm going to click on '=' and, truly, I'm expecting to get....
  345. #
  346. :M295|240|100
  347. :BL1:BL0
  348. :#SUL
  349. Don't tell me that the result is not equal to six, please!
  350. #
  351. :C00
  352. @E]<]|]|]|]|]|]!
  353. :)
  354. :GmainMenu
  355. :LpbrushDemo
  356. //
  357. // Launch paintbrush.exe
  358. //
  359. :(pbrush.exe
  360. :C11
  361. //:=200
  362. // Make sure the paint area is big enough
  363. @OI@D@O]~]!
  364. //Make it fullscreen
  365. @F]<]|]|]|]|]!
  366. // Select font
  367. @TFTimes New Roman]~Bold]~32]~]~]!
  368. // Assume, that the whole windows area is 1024x768
  369. :OSW
  370. :S1024|